package main

import (
    //"fmt"
	"thirdpaysdk/api/chinaums"
	"github.com/astaxie/beego"
	//"io/ioutil"
)

func microApp() {
   
	mid := "898440057340005"
	tid := "99113921"
	msgSrc := "WWW.BJLXOMSM.COM"
	secreCode := "CaJydcz5nafZxJDGkw2QWH7E2zJfYF3xpwZZhmEZD4jHBmKe"
	
	orderId := "50130000007"
	openId := "oQlEQ0RqFx7ufQUbkrNB8xouAgDI"
	
	notifyUrl := "https://api.dhfapp.com" + "/public/chinaums/notify"
	amount := 1
	rsp, err := chinaums.MicroAppPay(mid,tid,msgSrc,secreCode,openId,orderId,notifyUrl,"charge",amount)
	if err != nil {
	   beego.Debug("MicroAppPay error:", err.Error())
	   return
	}
	beego.Debug("MicroAppPay:", string(rsp.MiniPayRequest))
}
